package com.toulouse.recyclage.bo;

import com.toulouse.recyclage.R;

public class DoubleContainer extends RecycleContainer {

	public enum DoubleContainerType {
		DOUBLEGLASS, DOUBLEPACKAGE, GLASSPACKAGE;
	}

	private DoubleContainerType doubleContainerType;

	@Override
	public Integer getRecyclePlaceNameResourceId() {
		return R.string.maptitledouble;
	}

	public DoubleContainer(RecycleContainer container1, RecycleContainer container2) {
		this.setCity(container1.getCity());
		this.setGeoPoint(container1.getGeoPoint());
		this.setStreet(container1.getStreet());
		this.setZipCode(container1.getZipCode());
		this.setId(container1.getId() + container2.getId());

		if (container1 instanceof GlassContainer) {
			if (container2 instanceof GlassContainer) {
				doubleContainerType = DoubleContainerType.DOUBLEGLASS;
			} else {
				doubleContainerType = DoubleContainerType.GLASSPACKAGE;
			}
		} else { // package
			if (container2 instanceof GlassContainer) {
				doubleContainerType = DoubleContainerType.GLASSPACKAGE;
			} else {
				doubleContainerType = DoubleContainerType.DOUBLEPACKAGE;
			}
		}
	}

	public DoubleContainerType getDoubleContainerType() {
		return doubleContainerType;
	}

}
